/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.luxoft.corporate.blog.db.entities;

import java.sql.Date;
import java.util.Objects;

/**
 *b_id int(11) AI PK 
b_author_id int(11) 
b_topic_id int(11) 
b_text text 
b_publish_date datetime
 * @author Egor
 */
public class BlogEntry {
    private int recordId;
    private int userId;
    private String userName;
    private String topicName;
    private int topicId;
    private String text;
    private Date publishDate;

    public BlogEntry() {
    }

    
    public BlogEntry(int recordId, int userId, String userName, String topicName, int topicId, String text, Date publishDate) {
        this.recordId = recordId;
        this.userId = userId;
        this.userName = userName;
        this.topicName = topicName;
        this.topicId = topicId;
        this.text = text;
        this.publishDate = publishDate;
    }

    public int getRecordId() {
        return recordId;
    }

    
    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getTopicName() {
        return topicName;
    }

    public void setTopicName(String topicName) {
        this.topicName = topicName;
    }

    public int getTopicId() {
        return topicId;
    }

    public void setTopicId(int topicId) {
        this.topicId = topicId;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public Date getPublishDate() {
        return publishDate;
    }

    public void setPublishDate(Date publishDate) {
        this.publishDate = publishDate;
    }

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 79 * hash + this.recordId;
        hash = 79 * hash + this.userId;
        hash = 79 * hash + Objects.hashCode(this.userName);
        hash = 79 * hash + Objects.hashCode(this.topicName);
        hash = 79 * hash + this.topicId;
        hash = 79 * hash + Objects.hashCode(this.text);
        hash = 79 * hash + Objects.hashCode(this.publishDate);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final BlogEntry other = (BlogEntry) obj;
        if (this.recordId != other.recordId) {
            return false;
        }
        
        return true;
    }
    
    
    
    
}
